
<template>
  <div>
    <h2 class="title">{{message}}</h2>
    <button @click="btnClick">按一下</button>
    <h2>{{name}}</h2>
    <Cpn></Cpn>
  </div>
</template>

<script>

import Cpn from './Cpn'

export default {
  name: "App",
  components:{
    Cpn
  },
  data(){
    return{
      message:'你好',
      name:'阿絮'
    }
  },
  methods:{
    btnClick(){
      console.log('你好，老温');
    }
  }
}
</script>

<style scoped>
  .title{
    color:red;
  }
</style>